package com.example.aerospacemanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName vehicle
 */
@TableName(value ="vehicle")
@Data
public class Vehicle implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer vehicleid;

    /**
     * 
     */
    private String licenseplatenumbe;

    /**
     * 
     */
    private String vehicleBrand;

    /**
     * 
     */
    private String vehicleModel;

    /**
     * 
     */
    private Date warrantyDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Vehicle other = (Vehicle) that;
        return (this.getVehicleid() == null ? other.getVehicleid() == null : this.getVehicleid().equals(other.getVehicleid()))
            && (this.getLicenseplatenumbe() == null ? other.getLicenseplatenumbe() == null : this.getLicenseplatenumbe().equals(other.getLicenseplatenumbe()))
            && (this.getVehicleBrand() == null ? other.getVehicleBrand() == null : this.getVehicleBrand().equals(other.getVehicleBrand()))
            && (this.getVehicleModel() == null ? other.getVehicleModel() == null : this.getVehicleModel().equals(other.getVehicleModel()))
            && (this.getWarrantyDate() == null ? other.getWarrantyDate() == null : this.getWarrantyDate().equals(other.getWarrantyDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVehicleid() == null) ? 0 : getVehicleid().hashCode());
        result = prime * result + ((getLicenseplatenumbe() == null) ? 0 : getLicenseplatenumbe().hashCode());
        result = prime * result + ((getVehicleBrand() == null) ? 0 : getVehicleBrand().hashCode());
        result = prime * result + ((getVehicleModel() == null) ? 0 : getVehicleModel().hashCode());
        result = prime * result + ((getWarrantyDate() == null) ? 0 : getWarrantyDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", vehicleid=").append(vehicleid);
        sb.append(", licenseplatenumbe=").append(licenseplatenumbe);
        sb.append(", vehicleBrand=").append(vehicleBrand);
        sb.append(", vehicleModel=").append(vehicleModel);
        sb.append(", warrantyDate=").append(warrantyDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}